/************************* 版权声明 *********************************
 * 
 * 版权所有：meymey
 * 
 ************************* 版本声明 *********************************
 *@since jdk1.5
 *@version 0.6
 ************************* 变更记录 *********************************
 *
 * 创建者：biqiang Email:bijiqiang@gmail.com   创建日期：2010-11-13
 * 创建记录：创建类结构。
 *
 ************************* 类描述 *********************************×
 *空间积分
 ************************* To  Do *********************************
 *
 ************************* 随   笔 ***********************************
 *
 ******************************************************************
 */
package com.realgodo.site.entity.space;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.realgodo.site.entity.IdEntity;

@Entity
@Table(name = "space_point")
public class SpacePoint extends IdEntity {

	private static final long serialVersionUID = -6272454546792986122L;

	private Space space;

	private Long point = 0L;

	private int level = 0;

	private Date lastLogin = new Date();

	@ManyToOne
	@JoinColumn(name = "space_id", referencedColumnName = "id", nullable = false)
	public Space getSpace() {
		return space;
	}

	public void setSpace(Space space) {
		this.space = space;
	}

	@Column
	public Long getPoint() {
		return point;
	}

	public void setPoint(Long point) {
		this.point = point;
	}

	@Column
	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "last_login")
	public Date getLastLogin() {
		return lastLogin;
	}

	public void setLastLogin(Date lastLogin) {
		this.lastLogin = lastLogin;
	}

}
